import React from "react";
import ReactDOM from "react-dom/client";

/**
 * 函数组件
 * @param props 组件接收到的属性对象
 */
function MyComponent(props) {
  return <h1 title={props.title}>Hello {props.title}</h1>;
}

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(<MyComponent title="千锋" />);
